package com.itlong.cloud.project.property;

import com.itlong.cloud.POJO.DTO.property.*;
import com.itlong.cloud.POJO.VO.property.PropertyMonthCardRuleGetOneVO;
import com.itlong.cloud.POJO.VO.property.PropertyMonthCardRuleGetPageVO;
import com.itlong.cloud.utils.page.Page;
import com.itlong.cloud.POJO.DTO.property.PropertyMonthCardRuleDeleteDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyMonthCardRuleGetOneDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyMonthCardRuleSaveDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyMonthCardRuleUpdateDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <desc>
 *      智慧停车-月卡缴费规则管理暴露接口
 * </desc>
 *
 * @createDate 2018/11/07
 */
@FeignClient(name = "project-service")
public interface IPropertyMonthCardRuleServiceClient {

    /**
     * <desc>
     *      添加月卡缴费规则
     * </desc>
     *
     * @param propertyMonthCardRuleSaveDTO 添加月卡缴费规则DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2018/11/07
     */
    @PostMapping(path = "property/monthCard/saveMonthCardRule")
    Integer saveMonthCardRule(@RequestBody PropertyMonthCardRuleSaveDTO propertyMonthCardRuleSaveDTO) throws Exception;

    /**
     * <desc>
     *      修改月卡缴费规则
     * </desc>
     *
     * @param propertyMonthCardRuleUpdateDTO 修改月卡缴费规则DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2018/11/07
     */
    @PostMapping(path = "property/monthCard/updateMonthCardRule")
    Integer updateMonthCardRule(@RequestBody PropertyMonthCardRuleUpdateDTO propertyMonthCardRuleUpdateDTO) throws Exception;

    /**
     * <desc>
     *      查询该月卡正使用的车辆数
     * </desc>
     *
     * @param monthCardId 月卡id
     * @return 车辆数
     * @author wangzhi
     * @createDate 2018/11/07
     */
    @PostMapping(path = "property/monthCard/getCarCountByMonthCardId")
    Integer getCarCountByMonthCardId(@RequestParam("monthCardId") String monthCardId) throws Exception;

    /**
     * <desc>
     *      删除月卡缴费规则
     * </desc>
     *
     * @param propertyMonthCardRuleDeleteDTO 删除月卡缴费规则DTO
     * @return 受影响行数
     * @author wangzhi
     * @createDate 2018/11/07
     */
    @PostMapping(path = "property/monthCard/deleteMonthCardRule")
    Integer deleteMonthCardRule(@RequestBody PropertyMonthCardRuleDeleteDTO propertyMonthCardRuleDeleteDTO) throws Exception;

    /**
     * <desc>
     *      查询单条月卡缴费规则
     * </desc>
     *
     * @param propertyMonthCardRuleGetOneDTO 查询单条月卡缴费规则DTO
     * @return 标准格式化响应结果
     * @author wangzhi
     * @createDate 2018/11/07
     */
    @PostMapping(path = "property/monthCard/getOneMonthCardRule")
    PropertyMonthCardRuleGetOneVO getOneMonthCardRule(@RequestBody PropertyMonthCardRuleGetOneDTO propertyMonthCardRuleGetOneDTO) throws Exception;

    /**
     * <desc>
     *      分页查询月卡缴费规则
     * </desc>
     *
     * @param propertyMonthCardRuleGetPageDTO 查询单条月卡缴费规则DTO
     * @return 分页结果
     * @author wangzhi
     * @createDate 2018/11/08
     */
    @PostMapping(path = "property/monthCard/getMonthCardRulePage")
    Page<PropertyMonthCardRuleGetPageVO> getMonthCardRulePage(@RequestBody PropertyMonthCardRuleGetPageDTO propertyMonthCardRuleGetPageDTO) throws Exception;
}
